<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-on指令的用法</title>
		<!-- 引入vue的js文件 -->
		<script src="js/vue.js"></script>
	</head>
	<body>
		
		<div id="app">			
			<button @click="doit(1,'您好')">点击</button>
			<input type="text" @keyup.Enter="writeMsg()"/>
		</div>		
	</body>
	<script>
	var app=new Vue({
		el:"#app",
		data:{
			msg:"helloworld!"			
		},
		methods:{
			doit:function(a,b){
				console.log(a)
				console.log(b)
			},
			writeMsg:function(){
				console.log(1111)
			}
			
		}
	})
	
	</script>
</html>
